package com.hdax.easybuy.controller;

import com.hdax.easybuy.api.orderAPI.OrderDetailServiceClient;
import com.hdax.easybuy.entity.OrderDetail;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
public class OrderDetailManagerController {

    @Resource
    private OrderDetailServiceClient orderDetailServiceClient;

    @RequestMapping("/managerOrderDetail/getOrderDetailByOrderId/{orderId}")
    public List<OrderDetail> getOrderDetailByOrderIdManager(@PathVariable("orderId")int orderId){

        return orderDetailServiceClient.getOrderDetailByOrderId(orderId);
    }
}
